<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport"
    content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>信息采集</title>
  <link rel="stylesheet" type="text/css" href="__CSS__/api.css" />
  <link rel="stylesheet" type="text/css" href="__CSS__/aui.css" />
  <style>
    body {
      background: #F6F6F6;
      background-image: linear-gradient(to bottom, #535557, #535557 160px, transparent 160px, transparent 100%);
      background-image: -webkit-linear-gradient(270deg, #535557, #535557 160px, transparent 160px, transparent 100%);
    }

    .aui-icon-tu {
      height: 2.2rem;
      width: 2.2rem;
      background: url(__IMG__/close.png) no-repeat 0.75rem center;
      background-size: 13px 13px;
    }

    .container {
      padding: 0.75rem;
      margin-bottom: 3rem;
    }

    .title {


      margin-bottom: 5px;
      font-size: 14px;
      color: #EE742B;
      line-height: 20px;
      position: relative;
      left: -8px;
    }

    .title span {
      position: absolute;
      left: -13px;
      top: 2px;
      width: 3px;
      height: 15px;
      background: #EE742B;
      border-radius: 0px 15px 15px 0px;
    }

    .box {
      background: #fff;
      padding: 0.7rem 1rem 7px;
      margin-bottom: 10px;
      border-radius: 10px;
    }

    .box1 {
      background: #fff;
      padding: 0 0.75rem;
      border-radius: 1px;

    }

    .inner {
      height: 2.5rem;
      align-items: center;
    }

    input[type="text"],
    input[type="tel"] {
      height: 2.5rem;
      margin-top: -1px;
      padding: 0;
      text-align: right;
      font-size: 0.8rem;
      color: #333;
      background: transparent;
    }

    input::-webkit-input-placeholder {
      font-size: 0.8rem;
      color: #AAAEB1;
    }

    .left_item {
      font-size: 0.8rem;
      color: #333;
    }

    .xing {
      color: #EE742B;
      font-size: 1rem;
      margin-right: 5px;
      margin-left: -0.35rem;
      font-weight: 500;
      line-height: 0.85rem;
      position: relative;
      top: 2px;
    }

    .arrow {
      width: 0.75rem;
      height: 0.75rem;
    }

    textarea {
      width: 100%;
      height: 3.5rem;
      padding: 0.45rem 0.6rem;
      background: #F6F6F7;
      border-radius: 1px;
      font-size: 0.8rem;
      color: #333;
      word-wrap: break-word;
      word-break: break-all;
      overflow-y: auto;
    }

    textarea::-webkit-input-placeholder {
      font-size: 0.8rem;
      color: #AAAEB1;
    }

    .btnBox {
      width: 100%;
    }

    .btn {
      width: 100%;
      height: 2.5rem;
      line-height: 2.5rem;
      text-align: center;
      font-size: 0.8rem;
      color: #fff;
      position: fixed;
      bottom: 0;
      left: 0;
      background: #EE7B35;
      border-radius: 10px 10px 0px 0px;
    }
  </style>
</head>

<body>
  <header class="aui-bar aui-bar-nav" id="header">
    <a class="aui-pull-left" href="JavaScript:;" onclick="history.go(-1);"> <span class="aui-iconfont aui-icon-tu"> </span> </a>
    <div class="aui-title">信息采集</div>
    <a class="aui-pull-right">
      <span class="aui-iconfont"></span>
    </a>
  </header>
  <div class="container">
    <div class="box">
      <div class="title"><span></span> 基础信息</div>
      <input type="hidden" value="{$schoolerp}" name="schoolerp" class="flex-con" />
      <input type="hidden" value="{$tg.id}" name="tg_id" class="flex-con" />
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">学校</div>
        <input type="text" value="{$school}" name="school" class="flex-con" readonly>
        <!--<img src="__IMG__/light_right.png" alt="" class="arrow">-->
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">入学年份</div>
        <input type="text" value="{$year}" name="year" class="flex-con" readonly>
        <!--<img src="__IMG__/light_right.png" alt="" class="arrow">-->
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">年级</div>
        <select name="grade" class="flex-con" style="background-color: #FFF;	direction: rtl;">
          <option value="">请选择年级</option>
          <option value="小班">小班</option>
          <option value="中班">中班</option>
          <option value="大班">大班</option>
          <option value="一年级">一年级</option>
          <option value="二年级">二年级</option>
          <option value="三年级">三年级</option>
          <option value="四年级">四年级</option>
          <option value="五年级">五年级</option>
          <option value="六年级">六年级</option>
          <option value="初一">初一</option>
          <option value="初二">初二</option>
          <option value="初三">初三</option>
          <option value="高一">高一</option>
          <option value="高二">高二</option>
          <option value="高三">高三</option>
          <option value="中专1">中专1</option>
          <option value="中专2">中专2</option>
          <option value="中专3">中专3</option>
          <option value="大专1">大专1</option>
          <option value="大专2">大专2</option>
          <option value="大专3">大专3</option>
          <option value="大一">大一</option>
          <option value="大二">大二</option>
          <option value="大三">大三</option>
        </select>
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">学生姓名</div>
        <input type="text" name="name" placeholder="请填写姓名" class="flex-con">
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">性别</div>
        <select name="sex" class="flex-con" style="background-color: #FFF;	direction: rtl;">
          <option value="">请选择性别</option>
          <option value="男">男</option>
          <option value="女">女</option>
        </select>
        <img src="__IMG__/light_right.png" alt="" class="arrow">
      </div>
      {if $tg.height == 1}
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">身高</div>
        <input type="tel" name="height" placeholder="请输入身高(CM)" class="flex-con">
      </div>
      {/if}
      {if $tg.weight == 1}
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">体重</div>
        <input type="tel" name="weight" placeholder="请输入体重(Kg)" class="flex-con">
      </div>
      {/if}
      <div class="inner flex-wrap">
        <div class="xing">*</div>
        <div class="left_item">衣服尺码</div>
        <!--<input type="text" placeholder="请选择衣服尺码" class="flex-con">-->
        <select name="size" class="flex-con" style="background-color: #FFF;	direction: rtl;">
          <option value="">请选择尺码</option>
          {volist name='sizes' id='s'}
          <option value="{$s}">{$s}</option>
          {/volist}
        </select>
        <img src="__IMG__/light_right.png" alt="" class="arrow">
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">联系电话</div>
        <input type="tel" name="phone" placeholder="请输入" class="flex-con" maxlength="11">
      </div>
    </div>
    {if $tg.send == 1}
    <div class="box">
      <div class="title"><span></span>收件信息</div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">收件人姓名</div>
        <input type="text" name="send_name" placeholder="请输入" class="flex-con">
      </div>
      <div class="inner flex-wrap">
        <div class="xing">*</div>
        <div class="left_item">收件地址</div>
        <input type="text" name="send_address" placeholder="请输入" class="flex-con">
      </div>
    </div>
    {/if}
  </div>
  <div class="btnBox">
    <div class="btn" onclick="caiji()">提 交</div>
  </div>
</body>
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
</html>
<script type="text/javascript">
    function caiji() {
        var param = $('.flex-con').serialize();
        $.ajax({
            url:'{:url("Index/collect")}',
            data: param, //
            type:'POST',
            dataType:'JSON',
            success: function(returndata){
                alert(returndata.msg);
                if(returndata.code == 200){
                    history.go(-1);
                }else{
                    return false;
                }
            },
            error:function () {
                alert('Ajax error!');
            }
        })
    }
</script>